package com.etc.util;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.etc.entity.User;

public class UserRowMapper implements RowMapper<User> {

	@Override
	public User mapRow(ResultSet arg0, int arg1) throws SQLException {
		User user = new User();
		user.setUserId(arg0.getInt("userId"));
		user.setUserName(arg0.getString("userName"));
		user.setUserPwd(arg0.getString("userPwd"));
		user.setUserSex(arg0.getString("userSex"));
		user.setUserTel(arg0.getString("userTel"));
		user.setUserAddress(arg0.getString("userAddress"));
		user.setUserLevel(arg0.getInt("userLevel"));
		user.setUserState(arg0.getInt("userState"));
		return user;
	}

}
